<template>

    <div>
         <router-link to="/"><van-nav-bar title="商品详情" left-text="返回"  left-arrow>
        
      </van-nav-bar></router-link>
        <van-swipe :autoplay="3000">
        <van-swipe-item v-for="(goods, index) in goodslist.img" :key="index">
            <img v-lazy="goods" style="height:360px;width:360px"/>
        </van-swipe-item>
        </van-swipe>
        <P style="font-size:24px;margin-left:10px">{{goodslist.name}}</P>
        <p style="color:red;margin-left:10px">单价：¥{{ goodslist.price }}</p>

        <van-goods-action>
            <van-goods-action-mini-btn
                icon="chat-o"
                text="客服"
                @click="onClickMiniBtn"
            />
            <van-goods-action-mini-btn
                icon="cart-o"
                text="购物车"
                @click="onClickMiniBtn"
            />
            <van-goods-action-big-btn
                text="加入购物车"
                @click="onClickBigBtn"
            />
            <van-goods-action-big-btn
                primary
                text="立即购买"
                @click="onClickBigBtn"
            />
        </van-goods-action>
    </div>
</template>
<script>
import {mapGetters} from 'vuex'
export default {
    data(){
        return {
           
        }
    },
   
  methods: {
    onClickMiniBtn() {
      Toast('点击图标');
    },
    onClickBigBtn() {
      Toast('点击按钮');
    },
  },
  computed:{
      ...mapGetters([
          'goodslist'
      ])
  }
}

</script>